import { createRouter, createWebHistory } from "vue-router"
import { staticRoutes } from "@/routes/modules/staticRoutes"
import { asyncRoutes } from './modules/asyncRoutes'
import { AddRouterBeforeEach } from './modules/permistion'

/** 创建路由 */
const router = createRouter({
    history: createWebHistory(),
    routes: staticRoutes,
    scrollBehavior: () => ({ left: 0, top: 0 })
})


export { staticRoutes, asyncRoutes }


AddRouterBeforeEach(router)

export default router